package com.lzhsite.technology.designPattern.flyweight;

import java.util.HashMap;

public class WebSiteFactory
{
    private HashMap flyWeights = new HashMap();

    public WebSite getWebSiteCategory(String key)
    {
        if (!flyWeights.containsKey(key))
        {
            flyWeights.put(key, new ConcreteWebSite(key));
        }
        return (WebSite) flyWeights.get(key);
    }
}
